<%@page import="cn.com.entity.Departments"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">		
a:visited {
	text-decoration: none;
	color: #03C;
}
a:hover {
	text-decoration: none;
	color: #69C;
}
a:active {
	text-decoration: none;
}
a:link {
	
	text-decoration: none;
}
body{
	color: #03C;
	font-size: 20px;
}
</style>
<script type="text/javascript">
function yanzheng(){
	var departmentsid=document.getElementsByName("departments.departmentsid").value;
	if(departmentsid==3){
		alert("如果您要体检，请您选择左侧的‘我要体检’！");
		return false;
	}
	return true;
}	

</script>
</head>
<body>
<form action="consumerselonedepartaction" onsubmit="return yanzheng()">
<h2 align="center">请选择科室</h2>
<table border="1" align="center" width="100%">
	<tr>
		<td>科室名称</td>
		<td>科室简介</td>
		<td>科室位置</td>
		<td>选择</td>
	</tr>
<%
if(session.getAttribute("departmentslist")!=null){
	List<Departments> list=(List<Departments>)session.getAttribute("departmentslist");
	for(int i=0;i<list.size();i++){
		Departments depart=list.get(i);	
		if(depart.getDepartmentsid()!=3){
%>	
	<tr>
		<td><%=depart.getDepartmentsname() %></td>
		<td><%=depart.getDepartmentsprofile() %></td>
		<td><%=depart.getDepartmentsposition()%></td>
		<td><input type="radio" name="departments.departmentsid"   value="<%=depart.getDepartmentsid()%>"/></td>
		
	</tr>
<%}
} 
	}%>	
	
	<tr>
		<td align="center" colspan="4"><input type="submit"  value=" 确 认  " style="font-size:20px; color:#FFF; background-image: url(images/lanseanniu.jpg);"/></td>
	</tr>
</table>
</form>
</body>
</html>